<div class="wrapLogin">
	<div class="greyBox">
		<div class="greyBox">
		<div class="viewBox viewBoxR">
			<div class="cT"><em class="cL"></em><em class="cR"></em></div>
			<div class="cL">
				<div class="cR">
					<div class="bodyBox">

<?php 
$categories = $mvc->getObject(CategoryService::CATEGORY);
$subcategories = $mvc->getObject(SubCategoryService::SUBCATEGORY);
$regions = $mvc->getObject(RegionService::REGIONS);
$countries = $mvc->getObject(CountryService::COUNTRY);
$errors = $mvc->getObject(ContentController::ERROR);
?>
<div class="unitABlock unitABlockLast">
	<?php if (isset($errors )){?>
		<div class="itemWarning">
			<ul>
				<li><?php echo $errors ?></li>
			</ul>
		</div>
	<?php } ?>
	<form action="new-order.html" method="post"  enctype="multipart/form-data">
		<div class="unitSnColumn">
			<div class="itemForm">
				<label>_i18n{Title}</label>
				<div class="itemData">
					<input name="order_name" class="inpTxt" type="text" value="<? if(isset($_POST['order_name'])) echo $_POST['order_name']; ?>" />
				</div>
			</div>
		</div>
		<div class="unitEqColumn">
			<div class="itemForm">
				<label>_i18n{Category}</label>
				<div class="itemData">
					<select name="category_id" class="gCategory">
	<?php			if (isset($categories) && $categories!=NULL){ 
					foreach($categories as $key=>$category){ ?>
							<option <?php if($_POST['category_id']==$category[CategoryService::ID]){echo "selected";} ?> value="<?php echo $category[CategoryService::ID] ?>"><?php echo $category[CategoryService::CAT_NAME] ?></option>
	<?php 				} 
				} ?>
					</select>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{SubCategory}</label>
				<div class="itemData">
					<select name="subcategory_id" class="gSubCategory">
	<?php			if (isset($subcategories) && $subcategories!=NULL){ 
					foreach($subcategories as $key=>$subcategory){ ?>						
							<option <?php if($_POST['subcategory_id']==$subcategory[SubCategoryService::ID]){echo "selected";} ?> value="<?php echo $subcategory[SubCategoryService::ID] ?>"><?php echo $subcategory[SubCategoryService::SUBCAT_NAME] ?></option>
	<?php 				} 
				} ?>
					</select>
				</div>
			</div>
		</div>
		<div class="unitSnColumn">
			<div class="itemForm">
				<label>_i18n{Description}</label>
				<div class="itemData">
					<textarea class="areaTxt" name="order_desc"><? if(isset($_POST['order_desc'])) echo $_POST['order_desc']; ?></textarea>
				</div>
			</div>
		</div>
		<div class="unitEqColumn">
			<div class="itemForm">
				<label>_i18n{Street}</label>
				<div class="itemData">
					<input name="street" class="inpTxt" type="text" value="<? if(isset($_POST['street'])) echo $_POST['street']; ?>"/>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{ZIP}</label>
				<div class="itemData">
					<input name="zip" class="inpTxt" type="text" value="<? if(isset($_POST['zip'])) echo $_POST['zip']; ?>"/>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{City}</label>
				<div class="itemData">
					<input name="city" class="inpTxt" type="text" value="<? if(isset($_POST['city'])) echo $_POST['city']; ?>"/>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{State}</label>
				<div class="itemData">
					<select name="region">
	<?php			if (isset($regions) && $regions!=NULL){ 
					foreach($regions as $key=>$region){ ?>
							<option value="<?php echo $region[RegionService::ID] ?>"><?php echo $region[RegionService::REGION_NAME] ?></option>
	<?php 				} 
				} ?>
					</select>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Country}</label>
				<div class="itemData">
					<select name="country">
	<?php			if (isset($countries) && $countries!=NULL){ 
					foreach($countries as $key=>$country){ ?>						
							<option value="<?php echo $country[CountryService::ID] ?>"><?php echo $country[CountryService::COUNTRY_NAME] ?></option>
	<?php 				} 
				} ?>
					</select>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Price}</label>
				<div class="itemData">
					<input name="order_price" class="inpTxt" type="text" value="<? if(isset($_POST['order_price'])) echo $_POST['order_price']; ?>"/>
				</div>
			</div>
		</div>
		<div class="unitSnColumn">
			<div class="itemForm">
				<label>_i18n{Photo} 1</label>
				<div class="itemData">
					<input type="file" name="file[1]" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Photo} 2</label>
				<div class="itemData">
					<input type="file" name="file[2]" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Photo} 3</label>
				<div class="itemData">
					<input type="file" name="file[3]" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Photo} 4</label>
				<div class="itemData">
					<input type="file" name="file[4]" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Offer period}</label>
				<div class="itemData">
					<label class="labelDate">_i18n{from}:</label>
					<input class="inpDate" name="from_date" type="text" value="<? if(isset($_POST['from_date'])) echo $_POST['from_date']; ?>"/>
					<label class="labelDate">_i18n{until}:</label>
					<input class="inpDate" name="until_date" type="text" value="<? if(isset($_POST['until_date'])) echo $_POST['until_date']; ?>"/>
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Implementation period}</label>
				<div class="itemData">
					<label class="labelDate">_i18n{from}:</label>
					<input class="inpDate" name="imp_from_date" type="text" value="<? if(isset($_POST['imp_from_date'])) echo $_POST['imp_from_date']; ?>"/>
					<label class="labelDate">_i18n{until}:</label>
					<input class="inpDate" name="imp_until_date" type="text" value="<? if(isset($_POST['imp_until_date'])) echo $_POST['imp_until_date']; ?>"/>
				</div>
			</div>
		</div>
		<div class="unitBtn">
			<button name="save" type="submit" value="save"><span><strong>_i18n{Save}</strong></span></button>
		</div>
	</form>
</div>


					</div>
				</div>
			</div>
			<div class="cB"><em class="cL"></em><em class="cR"></em></div>
		</div>
		<!-- fix gradient on -->
		<div class="lineHide"></div>
		<!-- fix gradient off -->
	</div>
</div>
</div>